﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="WebSite.MainPage" %>


<asp:Content ID="MainPage_TopMenu" ContentPlaceHolderID="ContentPlaceHolder_TopMenu" runat="server">

    <span>
        <asp:Label ID="User_Label" Font-Names="Segoe UI" Font-Size="14px" runat="server"></asp:Label>

        <asp:LinkButton ID="Logout_Button" OnClick="Logout_Button_Click" Font-Names="Segoe UI" Font-Size="14px" runat="server"
            Style="margin-left: 10px">Logout</asp:LinkButton>
    </span>
    <br />
    <asp:Label ID="UserBalance_Label" Font-Names="Segoe UI" Font-Size="14px" runat="server"></asp:Label>


    <br />


    <div id="TopMenuMain">
        <span style="font-family: 'Segoe UI'; font-size: 18px">
            <asp:LinkButton ID="TopUp_Button" OnClick="TopUp_Button_Click" runat="server">Top Up Account</asp:LinkButton>
        </span>

        <span style="margin-left: 10px; font-family: 'Segoe UI'; font-size: 18px">
            <asp:LinkButton ID="ViewPastOrders_Button" OnClick="ViewPastOrders_Button_Click" runat="server">View Past Orders</asp:LinkButton>
        </span>
    </div>


</asp:Content>

<asp:Content ID="MainPage_PageContent" ContentPlaceHolderID="ContentPlaceHolder_PageContent" runat="server">

    <asp:ScriptManager runat="server"></asp:ScriptManager>

    <asp:UpdatePanel ID="GridView_Panel" Visible="false" runat="server">

        <ContentTemplate>
            <asp:GridView ID="GridView1" RowStyle-HorizontalAlign="Center" runat="server" AutoGenerateColumns="false" CssClass="gridview">

                <Columns>

                    <asp:TemplateField HeaderText="Booking No.">
                        <ItemTemplate>
                            <asp:Label ID="BookingNo_Label" runat="server" Text='<%# Eval("bookingNO") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Plate No.">
                        <ItemTemplate>
                            <asp:Label ID="PlateNo_Label" runat="server" Text='<%# Eval("plateNO") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>


                    <asp:TemplateField HeaderText="Booked Time (hours)">
                        <ItemTemplate>
                            <asp:Label ID="BookedTime_Label" runat="server" Text='<%# Eval("TimeBooked_hours") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>


                    <asp:TemplateField HeaderText="Start Time">
                        <ItemTemplate>
                            <asp:Label ID="StartTime_Label" runat="server" Text='<%# Eval("StartTime") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                </Columns>
                <AlternatingRowStyle HorizontalAlign="Center" BackColor="#C2D69B" />
            </asp:GridView>

        </ContentTemplate>

    </asp:UpdatePanel>

</asp:Content>

<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder_MorePageContent">

    <div id="Bookings_Label">
        <asp:Label ID="BookingOrders_Label" Font-Names="Segoe UI" Visible="false" runat="server"></asp:Label>
    </div>

    <asp:Panel ID="TopUp_Panel" Visible="false" runat="server">
        <div id="TopUp">

            <span style="margin-right: 0px; width: 100px; font-family: 'Segoe UI'">Amount :
            <asp:DropDownList ID="BalanceValues_DropDownList" Width="100px" font-name="Segoe UI" runat="server">
                <asp:ListItem>10 RON</asp:ListItem>
                <asp:ListItem Selected="True">20 RON</asp:ListItem>
                <asp:ListItem>30 RON</asp:ListItem>
                <asp:ListItem>50 RON</asp:ListItem>
                <asp:ListItem>70 RON</asp:ListItem>
                <asp:ListItem>100 RON</asp:ListItem>


            </asp:DropDownList>
            </span>
            <br />
            <br />

            <asp:Button BackColor="Wheat" ID="Pay_button" OnClick="Pay_button_Click" OnClientClick="paymentAlert()" Height="30px" Font-Names="Segoe UI" runat="server" Text="Purchase" />

            <script type="text/javascript">
                function paymentAlert() {
                    alert("Payment succesful!");
                }
            </script>
            <br />
        </div>
    </asp:Panel>

</asp:Content>
